package net.sxnic.item.clpv;

import javax.persistence.Entity;
import javax.persistence.Table;

import net.sxinfo.core.entity.AbstractEntity;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 类别权限表，此表与Catalog表对应，在Catalog中维护数据将直接维护此表
 * 
 * @author yfsun
 * 
 */
@Entity
@Table(name = "item_clpv")
@BatchSize(size = 10)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Clpv extends AbstractEntity {

	private static final long serialVersionUID = 5392250445938721238L;

	public static final String PERMISSION_QUERY = "_query";

	public static final String PERMISSION_VERIRY = "_verify";

	public static final String[] DEFAULT_PERMISSIONS = new String[] {
			PERMISSION_VERIRY, PERMISSION_QUERY };

	/**
	 * 类别权限名，格式 item_query或item_verify或item.001_verify 一个名字代表一个类别权限，不允许出现逗号分隔的情况
	 */
	private String pvName;

	public Clpv() {
		super();
	}

	public Clpv(String pvName) {
		super();
		this.pvName = pvName;
	}

	public String getPvName() {
		return pvName;
	}

	public void setPvName(String pvName) {
		this.pvName = pvName;
	}

}
